Imports Phoenix.Events

Namespace Forms.Dialogs

    Public Class GoToDialog : Inherits PhoenixFormBase

#Region " Windows Form Designer generated code "

        Public Sub New()
            MyBase.New()

            'This call is required by the Windows Form Designer.
            InitializeComponent()

            'Add any initialization after the InitializeComponent() call

        End Sub

        'UserControl overrides dispose to clean up the component list.
        Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
            If disposing Then
                If Not (components Is Nothing) Then
                    components.Dispose()
                End If
            End If
            MyBase.Dispose(disposing)
        End Sub

        'Required by the Windows Form Designer
        Private components As System.ComponentModel.IContainer

        'NOTE: The following procedure is required by the Windows Form Designer
        'It can be modified using the Windows Form Designer.  
        'Do not modify it using the code editor.
        Friend WithEvents btnOk As DevExpress.XtraEditors.SimpleButton
        Friend WithEvents CancelBtn As DevExpress.XtraEditors.SimpleButton
        Friend WithEvents CalendarViewComboBox As DevExpress.XtraEditors.ComboBoxEdit
        Friend WithEvents Label1 As System.Windows.Forms.Label
        Friend WithEvents Label2 As System.Windows.Forms.Label
        Friend WithEvents DateBox As DevExpress.XtraEditors.DateEdit
        <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
            Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(GoToDialog))
            Me.btnOk = New DevExpress.XtraEditors.SimpleButton
            Me.CalendarViewComboBox = New DevExpress.XtraEditors.ComboBoxEdit
            Me.DateBox = New DevExpress.XtraEditors.DateEdit
            Me.CancelBtn = New DevExpress.XtraEditors.SimpleButton
            Me.Label1 = New System.Windows.Forms.Label
            Me.Label2 = New System.Windows.Forms.Label
            CType(Me.CalendarViewComboBox.Properties, System.ComponentModel.ISupportInitialize).BeginInit()
            CType(Me.DateBox.Properties, System.ComponentModel.ISupportInitialize).BeginInit()
            Me.SuspendLayout()
            '
            'btnOk
            '
            Me.btnOk.Location = New System.Drawing.Point(240, 8)
            Me.btnOk.Name = "btnOk"
            Me.btnOk.TabIndex = 4
            Me.btnOk.Text = "&OK"
            '
            'CalendarViewComboBox
            '
            Me.CalendarViewComboBox.EditValue = "Day Calendar"
            Me.CalendarViewComboBox.Location = New System.Drawing.Point(64, 40)
            Me.CalendarViewComboBox.Name = "CalendarViewComboBox"
            '
            'CalendarViewComboBox.Properties
            '
            Me.CalendarViewComboBox.Properties.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)})
            Me.CalendarViewComboBox.Properties.Items.AddRange(New Object() {"Day Calendar", "Week Calendar", "Month Calendar", "Scheduler"})
            Me.CalendarViewComboBox.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor
            Me.CalendarViewComboBox.Size = New System.Drawing.Size(160, 20)
            Me.CalendarViewComboBox.TabIndex = 3
            '
            'DateBox
            '
            Me.DateBox.EditValue = New Date(2005, 3, 29, 0, 0, 0, 0)
            Me.DateBox.Location = New System.Drawing.Point(64, 8)
            Me.DateBox.Name = "DateBox"
            '
            'DateBox.Properties
            '
            Me.DateBox.Properties.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)})
            Me.DateBox.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor
            Me.DateBox.Size = New System.Drawing.Size(160, 20)
            Me.DateBox.TabIndex = 1
            '
            'CancelBtn
            '
            Me.CancelBtn.Location = New System.Drawing.Point(240, 40)
            Me.CancelBtn.Name = "CancelBtn"
            Me.CancelBtn.TabIndex = 5
            Me.CancelBtn.Text = "&Cancel"
            '
            'Label1
            '
            Me.Label1.Location = New System.Drawing.Point(8, 10)
            Me.Label1.Name = "Label1"
            Me.Label1.Size = New System.Drawing.Size(40, 16)
            Me.Label1.TabIndex = 0
            Me.Label1.Text = "&Date:"
            '
            'Label2
            '
            Me.Label2.Location = New System.Drawing.Point(8, 42)
            Me.Label2.Name = "Label2"
            Me.Label2.Size = New System.Drawing.Size(56, 16)
            Me.Label2.TabIndex = 2
            Me.Label2.Text = "&Show in:"
            '
            'GoToDialog
            '
            Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
            Me.ClientSize = New System.Drawing.Size(322, 78)
            Me.Controls.Add(Me.Label2)
            Me.Controls.Add(Me.Label1)
            Me.Controls.Add(Me.CancelBtn)
            Me.Controls.Add(Me.DateBox)
            Me.Controls.Add(Me.CalendarViewComboBox)
            Me.Controls.Add(Me.btnOk)
            Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog
            Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
            Me.MaximizeBox = False
            Me.MinimizeBox = False
            Me.Name = "GoToDialog"
            Me.ShowInTaskbar = False
            Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent
            Me.Text = "Go To Date"
            CType(Me.CalendarViewComboBox.Properties, System.ComponentModel.ISupportInitialize).EndInit()
            CType(Me.DateBox.Properties, System.ComponentModel.ISupportInitialize).EndInit()
            Me.ResumeLayout(False)

        End Sub

#End Region

#Region " Event Handlers "
        Private Sub btnOk_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOk.Click
            AppRaiseEvent(Me, New PhoenixCalendarEventArgs(CalendarViewComboBox.SelectedIndex, DateBox.DateTime))
            Close()
        End Sub


        Private Sub CancelBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CancelBtn.Click
            Close()
        End Sub
#End Region

#Region " Basic Routines "
        Public Shadows Sub ShowDialog(ByVal c As PhoenixCalendar, ByVal d As Date)
            DateBox.DateTime = d
            CalendarViewComboBox.SelectedIndex = c
            MyBase.ShowDialog()
        End Sub
#End Region

    End Class
End Namespace

